<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 [#include "/webpage/common/common_css.html"/]
<body>  
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="${cache}/images/tab_03.gif" width="15" height="30" /></td>
        <td width="1101" background="${cache}/images/tab_05.gif">
        <img src="${cache}/images/311.gif" width="16" height="16" /> <span class="STYLE4"> 
                           客制化属性管理
         </span>
         </td>
           <td width="281" background="${cache}/images/tab_05.gif" style="text-align:right;" >
           <img src="${cache}/images/010.gif" style="cursor:pointer" alt="关闭" onclick="closeWin()">
        </td>
        <td width="14"><img src="${cache}/images/tab_07.gif" width="14" height="30" /></td>
      </tr>
       </table>
    </td>
  </tr>
  </table>
    </td>
  </tr>
   
  <tr>
     <td id="pageCatalogContent">
       <table width="99%" border="0" cellspacing="0" cellpadding="0">
       <tr>
        <td width="9" background="${cache}/images/tab_12.gif">&nbsp;</td>
        <td bgcolor="#f3ffe3">
        <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98"  >
          <tr style="height:26px"> 
            <td width="4%"  background="${cache}/images/tab_14.gif" class="STYLE1">
            <div align="center" class="STYLE2 STYLE1">序号</div></td>
            <td width="7%" background="${cache}/images/tab_14.gif" class="STYLE1">
            <div align="center" class="STYLE2 STYLE1">名称</div></td>
            <td width="6%"  background="${cache}/images/tab_14.gif" class="STYLE1">
            <div align="center" class="STYLE2 STYLE1">值</div></td>  
          </tr>  
           [#list customerFieldList as cf]
            <tr style="height:22px;"> 
            <td  bgcolor="#FFFFFF" class="STYLE2"><div align="center" class="STYLE2 STYLE1">${cf.seq!}</div></td>
            <td  bgcolor="#FFFFFF" class="STYLE2"><div align="center" class="STYLE2 STYLE1">${cf.label!}</div></td>
            <td  bgcolor="#FFFFFF">
             <div align="center" class="STYLE2 STYLE1">
                   <input name="fname" value="${cf.value!}" type="hidden">
                   <input name="fvalue" value="${cf.fValue!}">
             </div>
            </td> 
            </tr> 
            [/#list] 
          </table>
          </td>
          </tr>  
       </table>
     </td> 
    </tr>
   </table>
  </td>
  </tr> 


</table> 

<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr height="30">
        <td width="15" >
        <img src="${cache}/images/tab_20.gif" width="15"   /></td>
        <td background="${cache}/images/tab_21.gif" style="text-align:center">
          <input type="button" value="保存" onclick="saveCustomerField()">  
        </td>
        <td width="14"><img src="${cache}/images/tab_22.gif" width="14"  /></td>
      </tr> 
</table>
[#include "/webpage/common/common_js.html"/]
<script type="text/javascript"> 
      function saveCustomerField()
      {
            var arr = new Array();
            jQuery(":input[name='fname']").each(function(index,object)
             {
                   var fvalue = jQuery(":input[name='fvalue']",jQuery(object).parent()).val();
                   arr.push({name:jQuery(object).val(),value:fvalue});
               }
            );
            if(arr!=null&&arr.length>0)
            {
               jQuery.post(
                      base+"/saveCustomerFieldMain.do",
                      {data:JSON.stringify(arr),fieldHandler:"${fieldHandler}",filedCatalog:"${cataLog}"},
                      function(result){
                         // queryUserForm(1,15);
                          var d= eval("("+result+")");
                          if(d.STATUS=="0")
                           {
                             alert("保存成功!");
                             closeWin();
                           }
                          else
                           {
                              alert(d.MSG);
                           }
                         
               });
            }
            else
            {
               closeWin();
            }
           
      } 
</script>
</body>
</html>
